package com.woniuxy.controller;

import com.woniuxy.entity.RbacMenu;
import com.woniuxy.serive.RbacMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/menu")
public class RbacMenuController {
    @Autowired
    RbacMenuService rbacMenuService;
    @RequestMapping("/findAll")
    public List<RbacMenu> findAll() {
        List<RbacMenu> allByRoleId = rbacMenuService.findAllByRoleId("1");
        System.out.println(allByRoleId);
        return rbacMenuService.findAll();
    }
}
